*****************
****2012 ANES****
*****************

**lib-con placement
*dem party = libcpre_ptyd, 1(lib) 7(con)
gen demlibcon12 = libcpre_ptyd
recode demlibcon12 -99/0 8/99=. 

*rep party = libcpre_ptyr, 1(lib) 7(con)
gen replibcon12 = libcpre_ptyr
recode replibcon12 -99/0 8/99=. 

gen correctlibcon12 = 1 if demlibcon12 < replibcon12
replace correctlibcon12 = 0 if correctlibcon12==.

**spending
*dem party = spsrvpr_ssdem, 1(con) 7(lib)
gen demspend12 = spsrvpr_ssdem
recode demspend12 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

*rep party = spsrvpr_ssrep, 1(con) 7(lib)
gen repspend12 = spsrvpr_ssrep
recode repspend12 1=7 2=6 3=5 4=4 5=3 6=2 7=1 -99/0=. 8/99=.

gen correctspend12 = 1 if demspend12 < repspend12
replace correctspend12 = 0 if correctspend12==. 

**defense
*dem party = defsppr_dem, 1(lib) 7(con)
gen demdefense12 = defsppr_dem
recode demdefense12 -99/0 8/99=. 

*rep party = defsppr_rep, 1(lib) 7(con)
gen repdefense12 = defsppr_rep
recode repdefense12 -99/0 8/99=. 

gen correctdefense12 = 1 if demdefense12 < repdefense12
replace correctdefense12 = 0 if correctdefense12==.

**health insurance 
*dem party = inspre_dem, 1(lib) 7(con)
gen demhealth12 = inspre_dem
recode demhealth12 -99/0 8/99=. 

*rep party = inspre_rep, 1(lib) 7(con)
gen rephealth12 = inspre_rep
recode rephealth12 -99/0 8/99=. 

gen correcthealth12 = 1 if demhealth12 < rephealth12
replace correcthealth12 = 0 if correcthealth12==.


**office recognition
*speaker = ofcrec_speaker_correct (0 - wrong) (1 - correct)
gen knowspeaker12 = (ofcrec_speaker_correct==1)
*VP = ofcrec_vp_correct 
gen knowvp12 = (ofcrec_vp_correct==1)
*british pm = ofcrec_pmuk_correct
gen knowpm12 = (ofcrec_pmuk_correct==1)
*chief justice = ofcrec_cj_correct
gen knowchief12 = (ofcrec_cj_correct==1)

**party control
*house = knowl_housemaj (0 - wrong) (1 - correct)
gen correcthouse12 = (knowl_housemaj==1)

*senate = knowl_senmaj (0 - wrong) (1 - correct)
gen correctsenate12 = (knowl_senmaj==1)

****list of items created for sophistication: 
sum correctlibcon12 correctspend12 correctdefense12 correcthealth12 knowspeaker knowvp knowpm knowchief correcthouse12 correctsenate12
